#[cfg(test)]
mod ui_improvements_tests {
    use cdb_gui::CdbGui;

    #[test]
    fn test_database_object_icons() {
        // Test that our icon system returns correct icons for different database objects
        assert_eq!(CdbGui::get_db_object_icon("database"), "🗄️");
        assert_eq!(CdbGui::get_db_object_icon("table"), "📊");
        assert_eq!(CdbGui::get_db_object_icon("view"), "👁️");
        assert_eq!(CdbGui::get_db_object_icon("procedure"), "⚙️");
        assert_eq!(CdbGui::get_db_object_icon("function"), "🔧");
        assert_eq!(CdbGui::get_db_object_icon("trigger"), "⚡");
        assert_eq!(CdbGui::get_db_object_icon("index"), "📇");
        assert_eq!(CdbGui::get_db_object_icon("schema"), "📁");
        assert_eq!(CdbGui::get_db_object_icon("localhost"), "🖥️");
        assert_eq!(CdbGui::get_db_object_icon("unknown"), "📄");
    }

    #[test]
    fn test_gui_initialization() {
        // Test that GUI can be created successfully
        let gui = CdbGui::new();
        assert!(!gui.is_connected);
        assert!(gui.connection_string.is_empty());
        assert!(gui.query_result.is_empty());
        assert!(gui.ai_response.is_empty());
        assert!(gui.ai_prompt.is_empty());
    }

    #[test]
    fn test_theme_initialization() {
        // Test that theme is properly initialized
        let gui = CdbGui::new();
        // Basic theme validation - ensure colors are set
        assert_ne!(gui.theme.colors.background.r, 0.0);
        assert_ne!(gui.theme.colors.foreground.r, 0.0);
    }
}
